package designPatterns.factory;

public abstract class Factory {
	public abstract Persion createPsersion(int pid);

	public final Persion createVolkswagen(Class<? extends Persion> clazz) {
		Persion volkswagen = null;
		try {
			volkswagen = clazz.newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return volkswagen;
	};
}
